home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / Visibility.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  53 lines

  1. /*
  2.  * @(#)Visibility.java    1.6 98/07/01
  3.  *
  4.  * Copyright 1996-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.beans;
  16.  
  17. /**
  18.  * Under some circumstances a bean may be run on servers where a GUI
  19.  * is not available.  This interface can be used to query a bean to
  20.  * determine whether it absolutely needs a gui, and to advise the
  21.  * bean whether a GUI is available.
  22.  * <p>
  23.  * This interface is for expert developers, and is not needed
  24.  * for normal simple beans.  To avoid confusing end-users we
  25.  * avoid using getXXX setXXX design patterns for these methods.
  26.  */
  27.  
  28. public interface Visibility {
  29.  
  30.     /**
  31.      * @return True if the bean absolutely needs a GUI available in
  32.      *        order to get its work done.
  33.      */
  34.     boolean needsGui();
  35.  
  36.     /**
  37.      * This method instructs the bean that it should not use the Gui.
  38.      */
  39.     void dontUseGui();
  40.  
  41.     /**
  42.      * This method instructs the bean that it is OK to use the Gui.
  43.      */
  44.     void okToUseGui();
  45.  
  46.     /**
  47.      * @return true if the bean is currently avoiding use of the Gui.
  48.      *   e.g. due to a call on dontUseGui().
  49.      */
  50.     boolean avoidingGui();
  51.  
  52. }
  53.